/**
 * @Author: 陈瑞鹏
 * @Date:   2023-01-07 09:50:00
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2023-09-18 09:41:57
 */
import mongoose from "mongoose";

const Schema = mongoose.Schema;
const ExchangeSchema: mongoose.Schema = new Schema({
  roleId: { type: Number, display: "角色id", index: true },
  title: { type: String, display: "兑换码名称", default: "礼包码" },
  desc: { type: String, display: "兑换码描述", desc: "" },
  id: { type: String, display: "兑换码id" },
  type: { type: Number, display: "兑换码类型" },
  rewardArr: { type: Array, display: "奖励数组" },
  isUse: { type: Boolean, display: "是否失效", default: false },
  updateTime: { type: String, display: '更新时间' },
  createTime: { type: String, display: '创建时间' },
}).index({ roleId: 1 });

const Exchange = mongoose.model('Exchange', ExchangeSchema);
export default Exchange;